/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
// 封装检查mobile函数
export const validMobile = (val) => {
  const pattern = /^1[3-9][0-9]{9}$/
  // 定义布尔值变量 = val是否符合正则
  const isValid = pattern.test(val)
  return isValid
}
